package com.cxb.apipassenger.remote;


import com.cxb.internalcommon.dto.PassengerUser;
import com.cxb.internalcommon.dto.ResponseResult;
import com.cxb.internalcommon.request.VerificationCodeDTO;
import lombok.Getter;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient("service-passenger-user")
public interface ServicePassengerUserClient {

    @PostMapping("/user")
    public ResponseResult loginOrRegister(@RequestBody VerificationCodeDTO verificationCodeDTO);

    @GetMapping("/user/{phone}")
    public ResponseResult<PassengerUser> getUserByPhone(@PathVariable("phone")String phone);
}
